#include <GUICommandManager.h>
Public Member Functions | |
| GUICommandManager (int nUndoLevel=100) | |
| ~GUICommandManager () | |
| bool | CanUndo () const |
| bool | CanRedo () const |
| int | getUndoLevel () const |
| void | setUndoLevel (int newValue) |
| bool | IsDirty () const |
| Command * | getLastUndoCommand () const |
| Command * | getLastRedoCommand () const |
| void | DoCommand (Command *pCommand) |
| void | Undo () |
| void | Redo () |
| void | Clear () |
| void | SetClean () |
| void | AddUndo (Command *pCommand) |
| void | AddRedo (Command *pCommand) |
| void | ClearUndoList () |
| void | ClearRedoList () |
| void | ClearCommandList (CommandList *pList) |
Private Types | |
| typedef list< Command * > | CommandList |
Private Attributes | |
| CommandList | m_undoList |
| CommandList | m_redoList |
| int | m_nUndoLevel |
| int | m_nCleanCount |
Definition at line 5 of file GUICommandManager.h.
|
|
Definition at line 10 of file GUICommandManager.h. |
|
|
A constructor. Initializes m_nUndoLevel and m_nCleanCount variables.
Definition at line 43 of file GUICommandManager.h. |
|
|
A destructor. Clears m_undoList and m_redoList. Definition at line 52 of file GUICommandManager.h. References Clear(). |
|
|
pushes a Command object to the m_redoList.
Definition at line 107 of file GUICommandManager.cpp. References m_redoList. Referenced by Undo(). |
|
|
pushes a Command object to the m_undoList.
Definition at line 88 of file GUICommandManager.cpp. References m_nUndoLevel, and m_undoList. Referenced by DoCommand(), and Redo(). |
|
|
a constant member method showing if redo operation can be performed.
Definition at line 8 of file GUICommandManager.cpp. References m_redoList. Referenced by OSGWindows::canRedo(), and Redo(). |
|
|
a constant member method showing if undo operation can be performed.
Definition at line 2 of file GUICommandManager.cpp. References m_undoList. Referenced by OSGWindows::canUndo(), and Undo(). |
|
|
clears m_undoList and m_redoList. Definition at line 76 of file GUICommandManager.cpp. References ClearRedoList(), and ClearUndoList(). Referenced by OSGWindows::deleteFrame(), and ~GUICommandManager(). |
|
|
clears the given list.
Definition at line 122 of file GUICommandManager.cpp. Referenced by ClearRedoList(), and ClearUndoList(). |
|
|
clears m_redoList. Definition at line 117 of file GUICommandManager.cpp. References ClearCommandList(), and m_redoList. Referenced by Clear(), and DoCommand(). |
|
|
clears m_undoList. Definition at line 112 of file GUICommandManager.cpp. References ClearCommandList(), and m_undoList. Referenced by Clear(). |
|
|
execute the command and add it to undo list if succeeded.
Definition at line 39 of file GUICommandManager.cpp. References AddUndo(), ClearRedoList(), and Command::execute(). Referenced by OSGWindows::addCommandCut(), OSGWindows::addCommandDelete(), OSGWindows::addCommandInsertEnvObj(), OSGWindows::addCommandInsertTrafficLight(), OSGWindows::addCommandInsertTrafficSign(), OSGWindows::addCommandInsertVehicle(), OSGWindows::addCommandPaste(), OSGWindows::addCommandRotate(), and OSGWindows::addCommandTranslate(). |
|
|
a constant member method returning the first redoable command object.
Definition at line 34 of file GUICommandManager.cpp. References m_redoList. |
|
|
a constant member method returning the last performed command object.
Definition at line 29 of file GUICommandManager.cpp. References m_undoList. |
|
|
a constant member method returning the maximum undo level.
Definition at line 14 of file GUICommandManager.cpp. References m_nUndoLevel. |
|
|
a constant member method showing if any command operation is performed.
Definition at line 24 of file GUICommandManager.cpp. References m_nCleanCount. Referenced by OSGWindows::isModified(). |
|
|
performs redo operation to the first redoable command object. Definition at line 62 of file GUICommandManager.cpp. References AddUndo(), CanRedo(), Command::execute(), m_nCleanCount, and m_redoList. Referenced by OSGWindows::redo(). |
|
|
set m_nCleanCount as 0. Definition at line 83 of file GUICommandManager.cpp. References m_nCleanCount. |
|
|
set the maximum undo level.
Definition at line 19 of file GUICommandManager.cpp. References m_nUndoLevel. Referenced by OSGWindows::OSGWindows(). |
|
|
performs undo operation to the last performed command operation. Definition at line 48 of file GUICommandManager.cpp. References AddRedo(), CanUndo(), m_nCleanCount, m_undoList, and Command::unexecute(). Referenced by OSGWindows::undo(). |
|
|
a private variable. It holds if any command operation is performed. Definition at line 34 of file GUICommandManager.h. Referenced by IsDirty(), Redo(), SetClean(), and Undo(). |
|
|
a private variable. It holds maximum size of the m_undoList. Definition at line 28 of file GUICommandManager.h. Referenced by AddUndo(), getUndoLevel(), and setUndoLevel(). |
|
|
a private list of Command pointers. It holds the command objects on which redo operations can be performed. Definition at line 22 of file GUICommandManager.h. Referenced by AddRedo(), CanRedo(), ClearRedoList(), getLastRedoCommand(), and Redo(). |
|
|
a private list of Command pointers. It holds the command objects on which undo operations can be performed. Definition at line 16 of file GUICommandManager.h. Referenced by AddUndo(), CanUndo(), ClearUndoList(), getLastUndoCommand(), and Undo(). |
1.4.6-NO